package A_Druid;

import java.sql.*;

public class DruidUtilsDemo {
    public static void main(String[] args) {
        Connection conn = null;
        PreparedStatement ps = null;
        ResultSet rs = null;
        try {
            conn = DruidUtils.getConnection();
            String sql = "insert into emp1 values (null,?,?)";
            ps = conn.prepareStatement(sql);
            for (int i = 1; i <= 10; i++) {
                ps.setString(1,"user"+i);
                ps.setString(2,"女");
                ps.executeUpdate();
            }
            DruidUtils.close(rs,ps,conn);
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
    }
}
